Compare equality of char[] in C

Posted by rksprst on Stack Overflow See other posts from Stack Overflow or by rksprst
Published on 2010-03-13T23:10:42Z Indexed on 2010/03/13 23:15 UTC
Read the original article Hit count: 382

Filed under:
|
|

I have two variables:

char charTime[] = "TIME"; char buf[] = "SOMETHINGELSE";

I want to check if these two are equal... using charTime == buf doesn't work.

What should I use, and can someone explain why using == doesn't work?

Would this action be different in C and C++?

© Stack Overflow or respective owner

Related posts about c

    Related posts about equality